#ifndef PROJECT_H
#define PROJECT_H

#include <defs/export.h>
#include <defs/global.h>
#include <core/entityobject.h>
#include "projectfile.h"

#include <QtGui>
#include <QtCore>

class ProjectItem;
O_PRIVATE_DECLARE(Project);
class Project : public ProjectFile {
    Q_OBJECT
public:
    enum ProjectType { DeclarativeApplication };
    Project(ProjectItem *parent = 0);
    virtual ~Project();

    ProjectType type();

public slots:
    ProjectItem* addItem(ProjectItem* item, ProjectItem* parent = 0);

    bool create();

    virtual QWidget* widget();
	virtual QVariantMap serialize();
	virtual void deserialize(const QVariantMap& m);

    virtual bool load();

    bool save();
    bool saveAs(const QUrl& url);
    void unload();
signals:
    void projectLoaded();

private:
    O_PRIVATE_DECLARE_MEMBER(Project);
};

#endif // PROJECT_H

